﻿namespace OP10.GlobalVariables
{
    #region parameters
    public static class BridgeWireRollServoParam_Global
    {
        public static float nAcc { get; set; }         //加速度
        public static float nDec { get; set; }         //减速度
        public static float Override { get; set; }     //JOG速度百分比
        public static float nHomeSpeed { get; set; }   //原点速度
        public static float nHomePos { get; set; }     //原点位置
        public static float nJogSpeed { get; set; }    //JOG速度
        public static short nHomeMode { get; set; }    //回原点模式

        public static aWork[] aWork { get; set; } = new aWork[10] {
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },

        };
    }


    public static class BridgeWireTowerServoParam_Global
    {
        public static float nAcc { get; set; }         //加速度
        public static float nDec { get; set; }         //减速度
        public static float Override { get; set; }     //JOG速度百分比
        public static float nHomeSpeed { get; set; }   //原点速度
        public static float nHomePos { get; set; }     //原点位置
        public static float nJogSpeed { get; set; }    //JOG速度
        public static short nHomeMode { get; set; }    //回原点模式

        public static aWork[] aWork { get; set; } = new aWork[10] {
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },

        };
    }


    public static class XAxisServoParam_Global
    {
        public static float nAcc { get; set; }         //加速度
        public static float nDec { get; set; }         //减速度
        public static float Override { get; set; }     //JOG速度百分比
        public static float nHomeSpeed { get; set; }   //原点速度
        public static float nHomePos { get; set; }     //原点位置
        public static float nJogSpeed { get; set; }    //JOG速度
        public static short nHomeMode { get; set; }    //回原点模式

        public static aWork[] aWork { get; set; } = new aWork[10] {
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },

        };
    }
    public static class YAxisLeftServoParam_Global
    {
        public static float nAcc { get; set; }         //加速度
        public static float nDec { get; set; }         //减速度
        public static float Override { get; set; }     //JOG速度百分比
        public static float nHomeSpeed { get; set; }   //原点速度
        public static float nHomePos { get; set; }     //原点位置
        public static float nJogSpeed { get; set; }    //JOG速度
        public static short nHomeMode { get; set; }    //回原点模式

        public static aWork[] aWork { get; set; } = new aWork[10] {
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },

        };
    }
    public static class YAxisRightServoParam_Global
    {
        public static float nAcc { get; set; }         //加速度
        public static float nDec { get; set; }         //减速度
        public static float Override { get; set; }     //JOG速度百分比
        public static float nHomeSpeed { get; set; }   //原点速度
        public static float nHomePos { get; set; }     //原点位置
        public static float nJogSpeed { get; set; }    //JOG速度
        public static short nHomeMode { get; set; }    //回原点模式

        public static aWork[] aWork { get; set; } = new aWork[10] {
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },
            new() { },

        };
    }


    public class aWork
    {
        public float aWorkPos { get; set; }
        public float aWorkSpeed { get; set; }
    }


    //感应器
    public static class InductorParam_Global
    {
        public static bool[] aByPass { get; set; } = new bool[16];
        public static int[] aDelay { get; set; } = new int[16];
    }
    public static class TechniqueParam_Global
    {
        public static float GlassWidthLimitDown { get; set; }    //ST3玻璃体宽度下限
        public static float GlassWidthLimitUp { get; set; }      //ST3玻璃体宽度上限
        public static float GlassPointDisLimitDown { get; set; } //St3焊点中心到玻璃体下限
        public static float GlassPointDisLimitUp { get; set; }   //St3焊点中心到玻璃体上限
        public static float TensionLimitUp { get; set; }         //ST4桥丝拉力上限
        public static float TensionLimitDown { get; set; }       //ST4桥丝拉力下限
        public static float BodySmacPress { get; set; }          //ST4Body音圈电机焊针压力
        public static float PinSmacPress { get; set; }           //ST4Pin音圈电机焊针压力
        public static float WireLenLimitDown { get; set; }       //ST5桥丝长度下限
        public static float WireLenLimitUp { get; set; }         //ST5桥丝长度上限
        public static float BodyPointWidthLimitDown { get; set; }//ST5Body焊点宽度下限
        public static float BodyPointWidthLimitUp { get; set; }  //ST5Body焊点宽度上限
        public static float PinPointWidthLimitDown { get; set; } //ST5Pin焊点宽度下限
        public static float PinPointWidthLimitUp { get; set; }   //ST5Pin焊点宽度上限
        public static float BodyPointLenLimitDown { get; set; }  //ST5Body焊点长度下限
        public static float BodyPointLenLimitUp { get; set; }    //ST5Body焊点长度上限
        public static float PinPointLenLimitDown { get; set; }   //ST5Pin焊点长度下限
        public static float PinPointLenLimitUp { get; set; }     //ST5Pin焊点长度上限
        public static float BodyPointDisLimitDown { get; set; }  //ST5Body焊点到玻璃体距离下限
        public static float BodyPointDisLimitUp { get; set; }    //ST5Body焊点到玻璃体距离上限
        public static float PinPointDisLimitDown { get; set; }   //ST5Pin焊点到玻璃体距离下限
        public static float PinPointDisLimitUp { get; set; }     //ST5Pin焊点到玻璃体距离上限
        public static float PointDisLimitDown { get; set; }      //St5焊点到玻璃体距离之和下限
        public static float PointDisLimitUp { get; set; }        //St5焊点到玻璃体距离之和上限
        public static float ResisLimitDown { get; set; }         //ST6电阻值下限
        public static float ResisLimitUp { get; set; }           //ST6电阻值上限

    }


    public static class UseCount_Global
    {
        public static int BodyWeldNeedle { get; set; }// Body焊针易损次数

        public static int PinWeldNeedle { get; set; }     // Pin焊针易损次数
        public static int ResistNeedle_L { get; set; }   // 左电阻探针易损次数
        public static int ResistNeedle_R { get; set; }   // 右电阻探针易损次数
        public static int nParaData1 { get; set; }       // 预留
        public static int nParaData2 { get; set; }       // 预留

    }


    public static class WireParam_Global
    {
        public static float WireDia { get; set; }           //桥丝直径
        public static float WireLen_Set { get; set; }       //焊接桥丝长度
        public static float YL偏心距补偿 { get; set; }       //左偏心距补偿
        public static float YR偏心距补偿 { get; set; }       //右偏心距补偿
        public static float X轴补偿 { get; set; }            // X轴补偿
        public static float 桥丝距产品高度 { get; set; }     // 桥丝距产品高度
        public static float TensionLimit_UP { get; set; }   // 桥丝拉力上限
        public static float TensionLimit_Down { get; set; } // 桥丝拉力下限


        public static float TurretDia { get; set; }         // 转塔直径
        public static float FeedDia { get; set; }           // 桥丝卷直径
        public static float FeedAdjustSpeed { get; set; }  // 桥丝卷调整速度

        public static float X_ServoLimitMinus { get; set; } //X轴范围+
        public static float X_ServoLimitPlus { get; set; }  //X轴范围-
        public static float YL_ServoLimitMinus { get; set; }//Y左轴范围+
        public static float YL_ServoLimitPlus { get; set; } //Y左轴范围-
        public static float YR_ServoLimitMinus { get; set; }//Y右轴范围+
        public static float YR_ServoLimitPlus { get; set; } //Y右轴范围-


        public static float CheckPos_X { get; set; }        //X校准位置
        public static float CheckPos_YL { get; set; }       //YL校准位置
        public static float CheckPos_YR { get; set; }       //YR校准位置
        public static float CheckPinGap { get; set; }       //校准针间距
        public static float FixedPoint_X { get; set; }      //定点焊X轴位置
        public static float FixedPoint_YL { get; set; }     //定点焊YL轴位置
        public static float FixedPoint_YR { get; set; }     //定点焊YR轴位置
        public static float WireLenChangSpeed { get; set; }     //电极针调整速度 
        public static float WireDerictLen { get; set; }     //直接定义电极针间距

    }

    public static class LeftMotorParam_Global
    {
        public static int Speed { get; set; }         //运行速度
        public static int WorkPosition { get; set; }  //工作位置
        public static float Pression { get; set; }      //工作压力
        public static int CheckPosition { get; set; } //校准位置
        public static int WaitPostion { get; set; }   //等待位置
        public static int Position_Error { get; set; }//位置误差
        public static int VM_SPEED { get; set; }      //软着陆速度
        public static int VM_ACC { get; set; }        //软着陆加速度
        public static int DirectPos { get; set; }     //手动定点位置
        public static int DirectSpeed { get; set; }   //手动定点速度
        public static float Step1_ForceIN { get; set; } //称数据输入1
        public static float Step2_ForceIN { get; set; } //称数据输入2
        public static int SetCount_R { get; set; }    //次数设定
        public static int SafeLocation { get; set; }    //安全位置
    }

    public static class RightMotorParam_Global
    {
        public static int Speed { get; set; }         //运行速度
        public static int WorkPosition { get; set; }  //工作位置
        public static float Pression { get; set; }      //工作压力
        public static int CheckPosition { get; set; } //校准位置
        public static int WaitPostion { get; set; }   //等待位置
        public static int Position_Error { get; set; }//位置误差
        public static int VM_SPEED { get; set; }      //软着陆速度
        public static int VM_ACC { get; set; }        //软着陆加速度
        public static int DirectPos { get; set; }     //手动定点位置
        public static int DirectSpeed { get; set; }   //手动定点速度
        public static float Step1_ForceIN { get; set; } //称数据输入1
        public static float Step2_ForceIN { get; set; } //称数据输入2
        public static int SetCount_R { get; set; }    //次数设定
        public static int SafeLocation { get; set; }    //安全位置

    }


    public static class TestMachine_Global
    {
        public static float nCheckResist { get; set; }            //校验块电阻值
        public static float nCheckOffset { get; set; }  //允许误差


    }


    public static class ContinuousNGCount_GLobal
    {
        public static short nParaData0 { get; set; }
        public static short nParaData1 { get; set; }
        public static short nParaData2 { get; set; }
        public static short nParaData3 { get; set; }
        public static short nParaData4 { get; set; }
        public static short nParaData5 { get; set; }
        public static short nParaData6 { get; set; }
        public static short nParaData7 { get; set; }
        public static short nParaData8 { get; set; }
        public static short nParaData9 { get; set; }
    }
    #endregion

    #region 伺服




    public class ServoPCToPLC_Global
    {
        public bool bReleaseBT { get; set; }     //使能按钮
        public bool bHomeBT { get; set; }        //回原点按钮
        public bool bForwardBT { get; set; }     //正方向按钮
        public bool bReverseBT { get; set; }     //负方向按钮
        public bool bManualMoveBT { get; set; }  //手动定位按钮
        public bool bBackAutoPosBT { get; set; } //返回自动位置按钮
        public int nHmiIndex { get; set; }      //HMI轴位置编号


    }

    public class ServoPLCToPC_Global
    {
        public bool bPowerOK { get; set; }       //使能OK反馈
        public bool bHomeCmp { get; set; }       //回原点完成
        public bool bForwardMoving { get; set; } //正转移动
        public bool bReverseMoving { get; set; } //反转移动
        public bool bManualMoving { get; set; }  //手动定位中
        public bool bNotInAutoPos { get; set; }  //不在自动位
        public bool bAxisError { get; set; }     //轴警告
        public bool bAxisAlarm { get; set; }     //轴报警
        public bool bLimmitAlarm { get; set; }   //极限报警
        public bool bRelative { get; set; }      //0:绝对定位模式     1:相对定位模式
        public bool bMDI_Mode { get; set; }      //0 - 位置方式，1 - 速度方式
        public bool bHomeDirection { get; set; } //回原点方式0：正方向，1：负方向
        public bool bManualLock { get; set; }    //手动中可动作条件
        public bool bAutoLock { get; set; }      //自动可动作条件
        public bool bOriginSensor { get; set; }  //原点
        public bool bCcwLimitSensor { get; set; }//负极限
        public bool bCwLimitSensor { get; set; } //正极限
        public bool bAxisBusy { get; set; }      //轴运动中
        public bool bBreakOut { get; set; }      //刹车打开
        public float nActualPosition { get; set; }//当前位置
        public float nActualVelocity { get; set; }//当前速度
        public int nAutoIndex { get; set; }     //自动轴位置编号
        public int nCurrIndex { get; set; }     //当前轴位置编号

        public bool[] nAralmHMIdiaplay { get; set; } = new bool[16];
        public bool[] nFaultCode { get; set; } = new bool[16];
    }


    /// <summary>
    /// 桥丝卷
    /// </summary>
    public static class BridgeWireRollServo
    {
        public static ServoPCToPLC_Global servoPCToPLC_Global { get; set; } = new ServoPCToPLC_Global();

        public static ServoPLCToPC_Global ServoPLCToPC_Global { get; set; } = new ServoPLCToPC_Global();
    }

    /// <summary>
    /// 桥丝转塔
    /// </summary>
    public static class BridgeWireTowerServo
    {
        public static ServoPCToPLC_Global servoPCToPLC_Global { get; set; } = new ServoPCToPLC_Global();

        public static ServoPLCToPC_Global ServoPLCToPC_Global { get; set; } = new ServoPLCToPC_Global();
    }

    /// <summary>
    /// x轴
    /// </summary>
    public static class XAxisServo
    {
        public static ServoPCToPLC_Global servoPCToPLC_Global { get; set; } = new ServoPCToPLC_Global();

        public static ServoPLCToPC_Global ServoPLCToPC_Global { get; set; } = new ServoPLCToPC_Global();
    }

    /// <summary>
    /// y轴左
    /// </summary>
    public static class YAxisLeftServo
    {
        public static ServoPCToPLC_Global servoPCToPLC_Global { get; set; } = new ServoPCToPLC_Global();

        public static ServoPLCToPC_Global ServoPLCToPC_Global { get; set; } = new ServoPLCToPC_Global();
    }
    /// <summary>
    /// y右
    /// </summary>
    public static class YAxisRightServo
    {
        public static ServoPCToPLC_Global servoPCToPLC_Global { get; set; } = new ServoPCToPLC_Global();

        public static ServoPLCToPC_Global ServoPLCToPC_Global { get; set; } = new ServoPLCToPC_Global();
    }

    #endregion

    #region 气缸

    public class CylinderPCToPLC_Global
    {
        public bool bManualBT { get; set; }      //手动操作按钮
        public bool bOrgSenByPass { get; set; }  //原点警报屏蔽
        public bool bWorkSenByPass { get; set; } //动点警报屏蔽
        public int tBackTime { get; set; }      //原点延迟
        public int tGoTime { get; set; }        //动点延迟


    }

    public class CylinderPLCToPC_Global
    {
        public bool bOriginSensor { get; set; }  //气缸原点感应器
        public bool bWorkSensor { get; set; }    //气缸动点感应器
        public int nCyStatus { get; set; }      //气缸状态显示
        public bool[] nHmiDisplay { get; set; } = new bool[16]; //故障显示
    }

    /// <summary>
    /// ST1极性检测上下
    /// </summary>
    public static class ST01CheckUpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }



    /// <summary>
    /// 搬运夹爪
    /// </summary>
    public static class ST01CheckCarryJiaZhuaCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    /// <summary>
    /// 旋转夹爪
    /// </summary>
    public static class ST01CheckSpinJiaZhuaCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    /// <summary>
    /// 搬运
    /// </summary>
    public static class ST01CheckCarryCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    /// <summary>
    /// 旋转
    /// </summary>
    public static class ST01CheckSpinCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    /// <summary>
    /// 夹持
    /// </summary>
    public static class ST01CheckClampCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    /// <summary>
    /// 上料上下
    /// </summary>

    public static class ST01LoadUpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();

    }
    /// <summary>
    /// 上料旋转
    /// </summary>
    public static class ST01LoadSpinCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    /// <summary>
    /// 上料顶升
    /// </summary>
    public static class ST01LoadJackCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    /// <summary>
    /// 矫正
    /// </summary>
    public static class ST01RectifyCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    /// <summary>
    /// 吹气
    /// </summary>
    public static class ST01BlowAirCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    /// <summary>
    /// st2夹爪
    /// </summary>
    public static class ST02JiaZhuaCy
    {

        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST03DownPushCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST03JackMaterialCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST04WiredClampCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();


    }
    public static class ST04ShiftCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST04PushMaterialUpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST04ElectrodeUpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST04StationBreakAwayCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST04TrashBlowCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST04TrashInhaleCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST05LightCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST06TestUpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST06TestJackCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST06TestClampCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST07PushMaterialCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST07SpinCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST07UpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    public static class ST07JackCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }


    public static class ST09UpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST10UpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }

    public static class ST11UpDownCy
    {
        public static CylinderPCToPLC_Global cylinderPCToPLC_Global = new CylinderPCToPLC_Global();

        public static CylinderPLCToPC_Global cylinderPLCToPC_Global = new CylinderPLCToPC_Global();
    }
    #endregion

    #region System
    public static class SystemPCToPLC_Global
    {

        public static bool bManualModeBT { get; set; } //手自动模式切换按钮
        public static bool bInitialBT { get; set; } //全部初始化按钮
        public static bool bHMIStart { get; set; }//触摸屏启动按钮
        public static bool bHMIStop { get; set; } //触摸屏停止按钮
        public static bool bHMIStep { get; set; } //触摸屏寸动按钮
        public static bool bHMIReset { get; set; }//触摸屏复位按钮
        public static bool bHMICycleStop { get; set; }//循环停止

        public static bool bCountClearBtn { get; set; }//计数清零按钮
        public static bool bClearMatBtn { get; set; }  //清料按钮
        public static bool bLEDPowerBtn { get; set; }  //LED灯开关
        public static bool bDryRunBtn { get; set; }    //空跑按钮
        public static bool bDoorByPass { get; set; }   //安全门屏蔽
        public static bool bPcDisableBtn { get; set; }//PC屏蔽按钮
        public static bool bCcdDisableBtn { get; set; }//CCD屏蔽按钮
        public static bool bWeldByPass { get; set; }//焊接屏蔽
        public static bool bSmacByPass { get; set; }//音圈电机屏蔽

        public static bool[] bCarrierByPass { get; set; } = new bool[16];//载具屏蔽
        /// <summary>
        /// 初始化
        /// </summary>
        public static void Init()
        {
            bInitialBT = true;
            bManualModeBT = false;
            bHMIStart = false;
            bHMIStop = false;
            bHMIReset = false;
        }



    }


    public static class SystemPLCToPC_Global
    {
        public static bool bManualMode { get; set; }  //手自动模式
        public static bool bInitialing { get; set; }  // 初始化中
        public static bool bHMIStartLamp { get; set; }// 启动灯(HMI)
        public static bool bHMIStopLamp { get; set; } // 停止灯(HMI)
        public static bool bHMIStepLamp { get; set; } // 寸动灯(HMI)
        public static bool bHMIResetLamp { get; set; }// 复位灯(HMI)
        public static bool bHMICycleStopLamp { get; set; }// 循环停止灯(HMI)
        public static bool bClearingMat { get; set; } // 清料中
        public static bool bClearCmp { get; set; }    // 清料完成
        public static bool bDryRunning { get; set; }  // 空跑中
        public static bool bPcDisabled { get; set; }  // PC屏蔽中
        public static bool bCcdDisabled { get; set; } // CCD屏蔽中
        public static bool RecipeLoadOK { get; set; } //配方下载OK
        public static bool bool1 { get; set; } //bool 预留
        public static bool bool2 { get; set; } //预留
        public static bool bool3 { get; set; } //预留
       



        #region 产品计数/CT/机台状态/型号
        /// <summary>
        /// 型号
        /// </summary>
        public static int PartCode { get; set; }
        /// <summary>
        /// 产品CT
        /// </summary>
        public static float nCycleTime { get; set; }
        /// <summary>
        /// 产品总数
        /// </summary>
        public static int nCounter { get; set; }
        /// <summary>
        /// 产品成功数
        /// </summary>
        public static int nCounterOK { get; set; }
        /// <summary>
        /// 产品失败数
        /// </summary>
        public static int nCounterNG { get; set; }
        /// <summary>
        /// 产品成功率
        /// </summary>
        public static float nOKrate { get; set; }
        /// <summary>
        /// 机台状态
        /// </summary>
        public static int nMachineStatus { get; set; }


        public static bool[] nHMIDisplay_SYS { get; set; } = new bool[16];
        public static bool[] nHMIDisplay_DoorEstopAlarm { get; set; } = new bool[16];
        public static bool[] nHMIDisplay_EstopAlarm { get; set; } = new bool[16];
        public static bool[] nHMIDisplay_OtherDevice { get; set; } = new bool[16];
        public static bool[] nHMIDisplay_Connect { get; set; } = new bool[16];
        public static bool[] nHMIDispaly_NoMaterial { get; set; } = new bool[16];
        public static bool[] nHMIDispaly_Warn1 { get; set; } = new bool[16];
        public static bool[] nHMIDispaly_Warn2 { get; set; } = new bool[16];

        #endregion
    }
    #endregion

    #region 工站
    public class StationPCToPLC
    {
        public bool bInitialST { get; set; }     //初始化按钮
        public bool bDisableBT { get; set; }     //工站屏蔽按钮
        public bool bCycleStartBT { get; set; }  //单循环启动按钮
        public bool bSignSTstartBT { get; set; } //单工站启动按钮



        public bool bGT2CheckBT { get; set; }
        public bool bPressCheckBT { get; set; }
        public bool bClearCounter { get; set; }
        public bool bOtherByPass1 { get; set; }
        public bool bOtherByPass2 { get; set; }
        public bool bSpotCheckBT { get; set; }
        public bool bIn2 { get; set; }
        public bool bIn3 { get; set; }
        public bool bIn4 { get; set; }
        public bool bIn5 { get; set; }
        public bool bIn6 { get; set; }
        public bool bIn7 { get; set; }

    }






    public class StationPLCToPC
    {
        public bool bInitialSTing { get; set; } //初始化中
        public bool bDisabled { get; set; }      //工站不启用
        public bool bAlarm { get; set; }         //故障
        public bool bCycleStart { get; set; }    //单循环启动
        public bool bSignSTstart { get; set; }   //单工站启动
        public bool bCylinderAlarm { get; set; } //气缸故障
        public bool bServoAlarm { get; set; }    //伺服故障

        public bool bGT2CheckIn { get; set; }     //GT2校验中
        public bool bPressCheckIn { get; set; }   //压力校验中
        public bool bDuring { get; set; }         //抽检中
        public bool bOut2 { get; set; }           //预留
        public bool bOut3 { get; set; }           //预留
        public bool bOut4 { get; set; }           //预留
        public bool bOut5 { get; set; }           //预留
        public bool bOut6 { get; set; }           //预留
        public bool bOut7 { get; set; }           //预留
        public int nCounter { get; set; }        //总数
        public int nCounterOK { get; set; }      //OK计数
        public int nCounterNG1 { get; set; }     //NG类别1计数
        public int nCounterNG2 { get; set; }     //NG类别2计数
        public int nCounterNG3 { get; set; }     //NG类别3计数
        public float nOKrate { get; set; }         //良率
        public float nCycleTime { get; set; }      //CT
        public int nStationStatus { get; set; }  //工站状态
        public int nCarrierStatus { get; set; }  //载具状态
        public int nAlarmCount { get; set; }     //故障次数
        public int nStationNumber { get; set; }  //工站号
        public bool[] nOtherAlarmDisplay { get; set; } = new bool[16];  //工站号
        public bool[] nOtherAlarmDisplay2 { get; set; } = new bool[16];  //工站号

    }


    public static class ST1Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST2Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST3Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }



    public static class ST4Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST5Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST6Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }

    public static class ST7Station_Global
    {

        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST8Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();

    }


    public static class ST9Station_Global
    {

        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST10Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST11Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST12Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }


    public static class ST13Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }

    public static class ST14Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }

    public static class ST15Station_Global
    {
        public static StationPCToPLC stationPCToPLC { get; set; } = new StationPCToPLC();
        public static StationPLCToPC stationPLCToPC { get; set; } = new StationPLCToPC();
    }
    #endregion


    #region 其他
    /// <summary>
    /// Body焊机实时数据
    /// </summary>
    public static class Welder_Global

    {
        public static float Body_AveV { get; set; }        //焊接平均电压
        public static float Body_AveI { get; set; }        //焊接平均电流
        public static float Body_AveW { get; set; }        //焊接平均功率
        public static float Body_R { get; set; }           //焊接电阻
        public static float Body_PeakV { get; set; }       //焊接峰值电压
        public static float Body_PeakI { get; set; }       //焊接峰值电流
        public static float Body_PeakW { get; set; }       //焊接峰值功率
        public static int Body_WeldHeigh { get; set; }   //焊接高度
        public static float Body_Pressure { get; set; }    //焊接压力

        public static float Pin_AveV { get; set; }         //焊接平均电压
        public static float Pin_AveI { get; set; }         //焊接平均电流
        public static float Pin_AveW { get; set; }         //焊接平均功率
        public static float Pin_R { get; set; }            //焊接电阻
        public static float Pin_PeakV { get; set; }        //焊接峰值电压
        public static float Pin_PeakI { get; set; }        //焊接峰值电流
        public static float Pin_PeakW { get; set; }        //焊接峰值功率
        public static int Pin_WeldHeigh { get; set; }    //焊接高度
        public static float Pin_Pressure { get; set; }     //焊接压力


    }


    public static class LeftMotorPCToPLC_Global
    {
        public static bool GetActualPos { get; set; }    //获取当前位置
        public static bool GetActualPress { get; set; }  //获取当前压力
        public static bool MotorON { get; set; }         //电机启动
        public static bool MotorOFF { get; set; }        //电机放松
        public static bool GoHome { get; set; }          //回原点
        public static bool Move { get; set; }            //工作下压
        public static bool DirectGo { get; set; }        //定点GO
        public static bool Initial { get; set; }         //初始化
        public static bool Abort { get; set; }           //左音圈放弃动作
        public static bool SoftLoad { get; set; }        //下降
        public static bool Step1_StartBT { get; set; }   //STEP1
        public static bool Step2_StartBT { get; set; }   //STEP2
        public static bool Reset { get; set; }           //复位

        public static bool ByPassBT { get; set; }//屏蔽按钮
        public static bool Bool2 { get; set; }   //预留
        public static bool Bool3 { get; set; }   //预留


        //public static int Speed { get; set; }         //运行速度
        //public static int WorkPosition { get; set; }  //工作位置
        //public static float Pression { get; set; }      //工作压力
        //public static int CheckPosition { get; set; } //校准位置
        //public static int WaitPostion { get; set; }   //等待位置
        //public static int Position_Error { get; set; }//位置误差
        //public static int VM_SPEED { get; set; }      //软着陆速度
        //public static int VM_ACC { get; set; }        //软着陆加速度
        //public static int DirectPos { get; set; }     //手动定点位置
        //public static int DirectSpeed { get; set; }   //手动定点速度
        //public static float Step1_ForceIN { get; set; } //称数据输入1
        //public static float Step2_ForceIN { get; set; } //称数据输入2
        //public static int SetCount_L { get; set; }    //次数设定
    }


    public static class RightMotorPCToPLC_Global
    {
        public static bool GetActualPos { get; set; }    //获取当前位置
        public static bool GetActualPress { get; set; }  //获取当前压力
        public static bool MotorON { get; set; }         //电机启动
        public static bool MotorOFF { get; set; }        //电机放松
        public static bool GoHome { get; set; }          //回原点
        public static bool Move { get; set; }            //工作下压
        public static bool DirectGo { get; set; }        //定点GO
        public static bool Initial { get; set; }         //初始化
        public static bool Abort { get; set; }           //左音圈放弃动作
        public static bool SoftLoad { get; set; }        //下降
        public static bool Step1_StartBT { get; set; }   //STEP1
        public static bool Step2_StartBT { get; set; }   //STEP2
        public static bool Reset { get; set; }           //复位

        public static bool ByPassBT { get; set; }//屏蔽按钮
        public static bool Bool2 { get; set; }   //预留
        public static bool Bool3 { get; set; }   //预留

        //public static int Speed { get; set; }         //运行速度
        //public static int WorkPosition { get; set; }  //工作位置
        //public static float Pression { get; set; }      //工作压力
        //public static int CheckPosition { get; set; } //校准位置
        //public static int WaitPostion { get; set; }   //等待位置
        //public static int Position_Error { get; set; }//位置误差
        //public static int VM_SPEED { get; set; }      //软着陆速度
        //public static int VM_ACC { get; set; }        //软着陆加速度
        //public static int DirectPos { get; set; }     //手动定点位置
        //public static int DirectSpeed { get; set; }   //手动定点速度
        //public static float Step1_ForceIN { get; set; } //称数据输入1
        //public static float Step2_ForceIN { get; set; } //称数据输入2
        //public static int SetCount_L { get; set; }    //次数设定
    }

    public static class LeftMotorPLCToPC_Global
    {
        public static bool ReadyOK { get; set; }            //电机准备Ok
        public static bool atHome { get; set; }             //电机在原点
        public static bool Step1_ForceIN_Req { get; set; }  //秤数据1输入完成
        public static bool Step2_ForceIN_Req { get; set; }  //秤数据2输入完成
        public static bool Step1Done { get; set; }          //第一步完成
        public static bool Step2Done { get; set; }          //第二步完成
        public static bool CheckDone { get; set; }          //校验OK


        public static bool bool1 { get; set; }
        public static bool bool2 { get; set; }
        public static bool bool3 { get; set; }
        public static bool bool4 { get; set; }
        public static bool bool5 { get; set; }
        public static bool bool6 { get; set; }
        public static bool bool7 { get; set; }
        public static bool bool8 { get; set; }
        public static bool bool9 { get; set; }

        public static int Step1_Pos { get; set; }         //位移1
        public static int Step2_Pos { get; set; }         //位移2
        public static int Step1_Press { get; set; }       //电机SQ值1
        public static int Step2_Press { get; set; }       //电机SQ值2
        public static int ActualCount_L { get; set; }     //当前次数
        public static float SMAC_Lfactor { get; set; }      //电机力因子
        public static float Lconstant { get; set; }         //电机常数
        public static int ActutalPositon { get; set; }    //当前位置
        public static float ActutalPression { get; set; }   //当前压力
        public static string ReceiveString { get; set; }     //反馈信息

    }
    //右电机
    public static class RightMotorPLCToPC_Global
    {

        public static bool ReadyOK { get; set; }            //电机准备Ok
        public static bool atHome { get; set; }             //电机在原点
        public static bool Step1_ForceIN_Req { get; set; }  //秤数据1输入完成
        public static bool Step2_ForceIN_Req { get; set; }  //秤数据2输入完成
        public static bool Step1Done { get; set; }          //第一步完成
        public static bool Step2Done { get; set; }          //第二步完成
        public static bool CheckDone { get; set; }          //校验OK

        public static bool bool1 { get; set; }
        public static bool bool2 { get; set; }
        public static bool bool3 { get; set; }
        public static bool bool4 { get; set; }
        public static bool bool5 { get; set; }
        public static bool bool6 { get; set; }
        public static bool bool7 { get; set; }
        public static bool bool8 { get; set; }
        public static bool bool9 { get; set; }
        public static int Step1_Pos { get; set; }         //位移1
        public static int Step2_Pos { get; set; }         //位移2
        public static int Step1_Press { get; set; }       //电机SQ值1
        public static int Step2_Press { get; set; }       //电机SQ值2
        public static int ActualCount_L { get; set; }     //当前次数
        public static float SMAC_Lfactor { get; set; }      //电机力因子
        public static float Lconstant { get; set; }         //电机常数
        public static int ActutalPositon { get; set; }    //当前位置
        public static float ActutalPression { get; set; }   //当前压力
        public static string ReceiveString { get; set; }     //反馈信息
    }


    /// <summary>
    /// 电极针
    /// </summary>
    public static class WirePCToPLC_Global
    {
        public static bool WireLenPlus { get; set; }     //桥丝长度+
        public static bool WireLenMinus { get; set; }    //桥丝长度-
        public static bool WireJodPlus { get; set; }     //桥丝前移
        public static bool WireJodMinus { get; set; }    //桥丝后移
        public static bool WireDerictLenGO { get; set; } //执行
        public static bool BackCheckPos { get; set; }    //回校准位置
        public static bool LoadWireManBT { get; set; }   //手动送桥丝
        public static bool Body_StartBT { get; set; }    //Body_焊机启动按钮
        public static bool Pin_StartBT { get; set; }     //Pin_焊机启动按钮
        public static bool WorkPosSearchBT { get; set; } //寻找工作位
        public static bool WeldStartBT { get; set; }     //焊接启动按钮
        public static bool bNeedleChangeBT { get; set; }     //更换焊针按钮
        public static bool bFixedPointBT { get; set; }     //定点焊接按钮
        public static bool BodyWeldByPass { get; set; }     // Body屏蔽
        public static bool PinWeldByPass { get; set; }     //Pin屏蔽按钮
        public static bool Bool4 { get; set; }     //








    }

    public static class WirePLCToPC_Global
    {
        public static bool LoadWireManStart { get; set; }    //手动送桥丝启动
        public static bool WeldStart { get; set; }           //焊接启动


        public static bool Bool1 { get; set; }
        public static bool Bool2 { get; set; }
        public static bool Bool3 { get; set; }
        public static bool Bool4 { get; set; }
        public static bool Bool5 { get; set; }
        public static bool Bool6 { get; set; }
        public static bool Bool7 { get; set; }
        public static bool Bool8 { get; set; }
        public static bool Bool9 { get; set; }
        public static bool Bool10 { get; set; }
        public static bool Bool11 { get; set; }
        public static bool Bool12 { get; set; }
        public static bool Bool13 { get; set; }
        public static bool Bool14 { get; set; }

        public static int WeldLength { get; set; }      //焊接距离
        public static float ActualTension { get; set; } //当前拉力

        public static float WireCurrentLen { get; set; }   //当前Pin间距
        public static int USageCount_L { get; set; }     //左焊针使用次数
        public static int USageCount_R { get; set; }     //右焊针使用次数
        public static float TargetPos_X { get; set; }      //X轴焊接目标位置
        public static float TargetPos_YL { get; set; }     //YL轴焊接目标位置
        public static float TargetPos_YR { get; set; }     //YR轴焊接目标位置

    }

    //电阻测试仪器
    public static class TestMachinePCToPLC_Global
    {
        public static bool Trigger { get; set; }       //触发
        public static bool RST { get; set; }           //复位
        public static bool SetMode { get; set; }       //一键模式设置
        public static bool TurnOnOutput { get; set; }  //测试打开
        public static bool TurnOffOutput { get; set; } //测试关闭
        public static bool CheckBt { get; set; }       //校验按钮

        public static bool bNeedleChangeBT { get; set; }    //探针更换按钮
        public static bool TestByPassBt { get; set; }       //屏蔽按钮
        public static bool Bool1 { get; set; }
        public static bool Bool2 { get; set; }
        public static bool Bool3 { get; set; }
        public static bool Bool4 { get; set; }
        public static bool Bool5 { get; set; }
        public static bool Bool6 { get; set; }
        public static bool Bool7 { get; set; }
        public static bool Bool8 { get; set; }




    }

    public static class TestMachinePLCToPC_Global
    {
        public static float nCurrentResist { get; set; }     //当前测得值
        public static float nCheckResultValue { get; set; }  //校验结果显示
        public static int USageCount_L { get; set; }       //左电阻探针使用次数
        public static int USageCount_R { get; set; }       //右电阻探针使用次数

    }


    public static class TurntablePCToPLC_Global
    {

        public static bool bHomeBT { get; set; }     //回原点按钮
        public static bool bJogBT { get; set; }    //点动按钮

        public static bool VibrateClear { get; set; }//震动盘清料按钮
        public static bool bIn3 { get; set; }
        public static bool bIn4 { get; set; }
        public static bool bIn5 { get; set; }
        public static bool bIn6 { get; set; }
        public static bool bIn7 { get; set; }
        public static bool bIn8 { get; set; }
        public static bool bIn9 { get; set; }
        public static bool bIn10 { get; set; }
        public static bool bIn11 { get; set; }
        public static bool bIn12 { get; set; }
        public static bool bIn13 { get; set; }
        public static bool bIn14 { get; set; }
        public static bool bIn15 { get; set; }

    }

    public static class TurntablePLCToPC_Global
    {
        public static bool OrgOK { get; set; }    //  原点OK
        public static bool Enable { get; set; }   //  使能
        public static bool NotAutoPos { get; set; } //不在自动位

        public static bool bIn3 { get; set; }//左电机安全位置
        public static bool bIn4 { get; set; }//右电机安全位置
        public static bool bIn5 { get; set; }
        public static bool bIn6 { get; set; }
        public static bool bIn7 { get; set; }

        public static byte StationCode { get; set; }  //位置代码

        public static short EncodeAngle { get; set; } //编码角度

        public static float nParaData2 { get; set; }
        public static float nParaData3 { get; set; }
        public static float nParaData4 { get; set; }
        public static float nParaData5 { get; set; }

    }



    public static class CCDPCToPLC_Global
    {
        public static bool ST3bAutoTrigger { get; set; }     //ST3CCD拍照触发
        public static bool ST3DisableBT { get; set; }     //ST3CCD屏蔽按钮
        public static bool ST3LightBT { get; set; }     //ST3CCD光源打开按钮
        public static bool ST3bCheckTrigger { get; set; }     //ST3CCD校验按钮
        public static bool ST3bIn4 { get; set; }     //预留
        public static bool ST3bIn5 { get; set; }     //预留
        public static bool ST3bIn6 { get; set; }     //预留
        public static bool ST3bIn7 { get; set; }     //预留
        public static bool ST5bAutoTrigger { get; set; }     //ST5CCD拍照触发
        public static bool ST5DisableBT { get; set; }     //ST5CCD屏蔽按钮
        public static bool ST5LightBT { get; set; }     //ST5CCD光源打开按钮
        public static bool ST5CheckTrigger { get; set; }     //ST5CCD校验按钮
        public static bool ST5ModeChange { get; set; }     //ST5模式切换
        public static bool ST5bIn5 { get; set; }     //预留
        public static bool ST5bIn6 { get; set; }     //预留
        public static bool ST5bIn7 { get; set; }     //预留
        public static bool[] ResultByPass { get; set; } = new bool[16];     //ST5测试结果屏蔽按钮
        public static short nParaData1 { get; set; }     //预留
        public static float nParaData2 { get; set; }     //预留
        public static float nParaData3 { get; set; }        //预留
    }

    public static class CCDPLCToPC_Global
    {
        public static bool ST3bWorkDone { get; set; }     //ST3CCD拍照完成
        public static bool ST3bCheckNg { get; set; }      //ST3CCD校验NG
        public static bool ST3bCheckOk { get; set; }      //ST3CCD校验OK
        public static bool ST3bIn3 { get; set; }             //预留
        public static bool ST3bIn4 { get; set; }             //预留
        public static bool ST3bIn5 { get; set; }             //预留
        public static bool ST3bIn6 { get; set; }             //预留
        public static bool ST3bIn7 { get; set; }             //预留
        public static bool ST5bWorkDone { get; set; }     //ST5CCD拍照完成
        public static bool ST5bCheckNg { get; set; }      //ST5CCD校验NG
        public static bool ST5bCheckOk { get; set; }      //ST5CCD校验OK
        public static bool ST5bIn3 { get; set; }             //预留
        public static bool ST5bIn4 { get; set; }             //预留
        public static bool ST5bIn5 { get; set; }             //预留
        public static bool ST5bIn6 { get; set; }             //预留
        public static bool ST5bIn7 { get; set; }             //预留
        public static float Target_PosX { get; set; }      //ST3CCD引导X轴补偿值
        public static float Target_PosYL { get; set; }     //ST3CCD引导Y左轴补偿值
        public static float Target_PosYR { get; set; }     //ST3CCD引导Y右轴补偿值
        public static float ST3GlassWidth { get; set; }    //ST3CCD检测玻璃体宽度值
        public static float ST3GlassPointDis { get; set; } //ST3焊点中心到玻璃体
        public static float nParaData2 { get; set; }       //预留
        public static float nParaData3 { get; set; }       //预留


    }
    #endregion


    #region ProductData


    public static class ProductData_Global
    {
        public static int CarrierID { get; set; }          //载具号
                                                           // public static float ST3PartOKW { get; set; }         //St3焊点检测状态
        public static float Body_AveV { get; set; }          //St4左Body焊接平均电压
        public static float Body_AveI { get; set; }          //St4左Body焊接平均电流
        public static float Body_AveW { get; set; }          //St4左Body焊接平均功率
        public static float Body_R { get; set; }             //St4左Body焊接电阻
        public static float Body_PeakV { get; set; }         //St4左Body焊接峰值电压
        public static float Body_PeakI { get; set; }         //St4左Body焊接峰值电流
        public static float Body_PeakW { get; set; }         //St4左Body焊接峰值功率
        public static int Body_WeldHeigh { get; set; }     //St4左Body焊接高度
        public static float Body_Pressure { get; set; }      //St4左Body焊接压力
        public static float Pin_AveV { get; set; }           //St4右Pin焊接平均电压
        public static float Pin_AveI { get; set; }           //St4右Pin焊接平均电流
        public static float Pin_AveW { get; set; }           //St4右Pin焊接平均功率
        public static float Pin_R { get; set; }              //St4右Pin焊接电阻
        public static float Pin_PeakV { get; set; }          //St4右Pin焊接峰值电压
        public static float Pin_PeakI { get; set; }          //St4右Pin焊接峰值电流
        public static float Pin_PeakW { get; set; }          //St4右Pin焊接峰值功率
        public static float Pin_WeldHeigh { get; set; }      //St4右Pin焊接高度
        public static float Pin_Pressure { get; set; }       //St4右Pin焊接压力
                                                             //    public static float ST4PartOKW { get; set; }         //St4焊接状态
        public static float RightPoint_Width { get; set; }   //St5右焊点宽度
        public static float LeftPoint_Width { get; set; }    //St5左焊点宽度
        public static float RightPoint_Len { get; set; }     //St5右焊点长度
        public static float LeftPoint_Len { get; set; }      //St5左焊点长度
        public static float Wire_Len { get; set; }           //St5桥丝长度
        public static float RightPoint_Dis { get; set; }     //St5右焊点到玻璃体距离
        public static float LeftPoint_Dis { get; set; }      //St5左焊点到玻璃体距离
        public static float Point_Dis { get; set; }          //St5焊点到玻璃体距离之和
        public static int ST5PartOKW { get; set; }         //St5桥丝检测结果
        public static float nResist { get; set; }            //St6电阻值
        public static float ST6PartOKW { get; set; }         //St6电阻值检测结果
                                                             // public static float ProductResult { get; set; }      //产品总结果

    }


    public static class CarrierStatus_Global
    {
        public static byte[] CarrierStatus { get; set; } = new byte[20]; //载具状态
    }
    #endregion


    #region CPK 

    public class CPK
    {
        public float Compare_Data { get; set; }
        public float Max_Data { get; set; }
        public float MIn_Data { get; set; }
        public float Average_Data { get; set; }
        public float σ_Data { get; set; }
        public float Cp { get; set; }
        public float Cpk { get; set; }

    }
    //ST3玻璃体宽度
    public static class ST1CPK_Global
    {
        public static CPK CPK1 { get; set; }
    }

    public static class ST2CPK_Global
    {
        public static CPK CPK2 { get; set; }
    }

    public static class ST3CPK_Global
    {
        public static CPK CPK3 { get; set; }
    }

    public static class ST4CPK_Global
    {
        public static CPK CPK4 { get; set; }
    }

    public static class ST5CPK_Global
    {
        public static CPK CPK5 { get; set; }
    }

    public static class ST6CPK_Global
    {
        public static CPK CPK6 { get; set; }
    }
    #endregion


    #region IO

    public static class IO_Global
    {
        public static bool[] IO_R = new bool[320];
    }
    #endregion


    #region Alarms


    public static class Alarm_Global
    {
        public static bool[] Alarms = new bool[1184];
    }
    #endregion


    public static class LoginInfo
    {
        public static bool IsLogin { get; set; } = true;
    }
}
